<template>
  <a-modal
    :title="title"
    :width="width"
    :visible="visible"
    :confirmLoading="confirmLoading"
    :zIndex="zIndex"
    @cancel="close"
  >
    <a-spin :spinning="confirmLoading" style="padding: 0 20px">
      <a-row>
        <a-col :span="24">{{ model.msg }}</a-col>
        <!-- <a-col :span="24" style="margin-top: 10px" v-if="model.type == 2">
          <a @click="stopRemind">{{ $t('以后不再提示') }}</a>
        </a-col> -->
      </a-row>
    </a-spin>
    <template slot="footer">
      <a-button @click="handleCancel">{{ model.type == 1 ? $t('以后再说') : $t('我知道了') }}</a-button>
      <a-button type="primary" @click="handleOk">{{ $t('立即修改') }}</a-button>
    </template>
  </a-modal>
</template>

<script>
import { httpAction } from '@/api/manage'
export default {
  name: 'UserRemindModal',
  data() {
    return {
      title: this.$t('提示'),
      width: 520,
      visible: false,
      confirmLoading: false,
      zIndex: 1002,
      model: {},
    }
  },
  methods: {
    show(result) {
      this.model = Object.assign({}, result)
      this.visible = true
    },
    handleCancel() {
      this.close()
    },
    close() {
      this.$emit('close')
      this.visible = false
    },
    handleOk() {
      this.$emit('ok')
      this.visible = false
    },
    stopRemind(){
      httpAction('system/user/stopRemind','put',{}).then(res=>{
        if(res.success){

        }else{
          this.$message.error(res.message)
        }
      })
    }
  },
}
</script>

<style scoped>
</style>

